3.2.3 \(\int \cot (c+d x) (a+i a \tan (c+d x))^{5/2} \, dx\) [103]

3.2.3.1 Optimal result
3.2.3.2 Mathematica [A] (verified)
3.2.3.3 Rubi [A] (verified)
3.2.3.4 Maple [A] (verified)
3.2.3.5 Fricas [B] (verification not implemented)
3.2.3.6 Sympy [F]
3.2.3.7 Maxima [A] (verification not implemented)
3.2.3.8 Giac [F]
3.2.3.9 Mupad [B] (verification not implemented)

3.2.3.1 Optimal result

Integrand size = 24, antiderivative size = 104 \[ \int \cot (c+d x) (a+i a \tan (c+d x))^{5/2} \, dx=-\frac {2 a^{5/2} \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {a}}\right )}{d}+\frac {4 \sqrt {2} a^{5/2} \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}-\frac {2 a^2 \sqrt {a+i a \tan (c+d x)}}{d} \]

output
-2*a^(5/2)*arctanh((a+I*a*tan(d*x+c))^(1/2)/a^(1/2))/d+4*a^(5/2)*arctanh(1 
/2*(a+I*a*tan(d*x+c))^(1/2)*2^(1/2)/a^(1/2))*2^(1/2)/d-2*a^2*(a+I*a*tan(d* 
x+c))^(1/2)/d
 
3.2.3.2 Mathematica [A] (verified)

Time = 0.29 (sec) , antiderivative size = 97, normalized size of antiderivative = 0.93 \[ \int \cot (c+d x) (a+i a \tan (c+d x))^{5/2} \, dx=-\frac {2 a^2 \left (\sqrt {a} \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {a}}\right )-2 \sqrt {2} \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )+\sqrt {a+i a \tan (c+d x)}\right )}{d} \]

input
Integrate[Cot[c + d*x]*(a + I*a*Tan[c + d*x])^(5/2),x]
 
output
(-2*a^2*(Sqrt[a]*ArcTanh[Sqrt[a + I*a*Tan[c + d*x]]/Sqrt[a]] - 2*Sqrt[2]*S 
qrt[a]*ArcTanh[Sqrt[a + I*a*Tan[c + d*x]]/(Sqrt[2]*Sqrt[a])] + Sqrt[a + I* 
a*Tan[c + d*x]]))/d
 
3.2.3.3 Rubi [A] (verified)

Time = 0.70 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.03, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.458, Rules used = {3042, 4039, 27, 3042, 4083, 3042, 3961, 219, 4082, 73, 221}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \cot (c+d x) (a+i a \tan (c+d x))^{5/2} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {(a+i a \tan (c+d x))^{5/2}}{\tan (c+d x)}dx\)

\(\Big \downarrow \) 4039

\(\displaystyle 2 a \int \frac {1}{2} \cot (c+d x) \sqrt {i \tan (c+d x) a+a} (3 i \tan (c+d x) a+a)dx-\frac {2 a^2 \sqrt {a+i a \tan (c+d x)}}{d}\)

\(\Big \downarrow \) 27

\(\displaystyle a \int \cot (c+d x) \sqrt {i \tan (c+d x) a+a} (3 i \tan (c+d x) a+a)dx-\frac {2 a^2 \sqrt {a+i a \tan (c+d x)}}{d}\)

\(\Big \downarrow \) 3042

\(\displaystyle a \int \frac {\sqrt {i \tan (c+d x) a+a} (3 i \tan (c+d x) a+a)}{\tan (c+d x)}dx-\frac {2 a^2 \sqrt {a+i a \tan (c+d x)}}{d}\)

\(\Big \downarrow \) 4083

\(\displaystyle a \left (4 i a \int \sqrt {i \tan (c+d x) a+a}dx+\int \cot (c+d x) (a-i a \tan (c+d x)) \sqrt {i \tan (c+d x) a+a}dx\right )-\frac {2 a^2 \sqrt {a+i a \tan (c+d x)}}{d}\)

\(\Big \downarrow \) 3042

\(\displaystyle a \left (4 i a \int \sqrt {i \tan (c+d x) a+a}dx+\int \frac {(a-i a \tan (c+d x)) \sqrt {i \tan (c+d x) a+a}}{\tan (c+d x)}dx\right )-\frac {2 a^2 \sqrt {a+i a \tan (c+d x)}}{d}\)

\(\Big \downarrow \) 3961

\(\displaystyle a \left (\frac {8 a^2 \int \frac {1}{a-i a \tan (c+d x)}d\sqrt {i \tan (c+d x) a+a}}{d}+\int \frac {(a-i a \tan (c+d x)) \sqrt {i \tan (c+d x) a+a}}{\tan (c+d x)}dx\right )-\frac {2 a^2 \sqrt {a+i a \tan (c+d x)}}{d}\)

\(\Big \downarrow \) 219

\(\displaystyle a \left (\int \frac {(a-i a \tan (c+d x)) \sqrt {i \tan (c+d x) a+a}}{\tan (c+d x)}dx+\frac {4 \sqrt {2} a^{3/2} \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}\right )-\frac {2 a^2 \sqrt {a+i a \tan (c+d x)}}{d}\)

\(\Big \downarrow \) 4082

\(\displaystyle a \left (\frac {a^2 \int \frac {\cot (c+d x)}{\sqrt {i \tan (c+d x) a+a}}d\tan (c+d x)}{d}+\frac {4 \sqrt {2} a^{3/2} \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}\right )-\frac {2 a^2 \sqrt {a+i a \tan (c+d x)}}{d}\)

\(\Big \downarrow \) 73

\(\displaystyle a \left (\frac {4 \sqrt {2} a^{3/2} \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}-\frac {2 i a \int \frac {1}{i-\frac {i (i \tan (c+d x) a+a)}{a}}d\sqrt {i \tan (c+d x) a+a}}{d}\right )-\frac {2 a^2 \sqrt {a+i a \tan (c+d x)}}{d}\)

\(\Big \downarrow \) 221

\(\displaystyle a \left (\frac {4 \sqrt {2} a^{3/2} \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}-\frac {2 a^{3/2} \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {a}}\right )}{d}\right )-\frac {2 a^2 \sqrt {a+i a \tan (c+d x)}}{d}\)

input
Int[Cot[c + d*x]*(a + I*a*Tan[c + d*x])^(5/2),x]
 
output
a*((-2*a^(3/2)*ArcTanh[Sqrt[a + I*a*Tan[c + d*x]]/Sqrt[a]])/d + (4*Sqrt[2] 
*a^(3/2)*ArcTanh[Sqrt[a + I*a*Tan[c + d*x]]/(Sqrt[2]*Sqrt[a])])/d) - (2*a^ 
2*Sqrt[a + I*a*Tan[c + d*x]])/d
 

3.2.3.3.1 Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 73
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[ 
{p = Denominator[m]}, Simp[p/b   Subst[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + 
 d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] && Lt 
Q[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntL 
inearQ[a, b, c, d, m, n, x]
 

rule 219
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* 
ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt 
Q[a, 0] || LtQ[b, 0])
 

rule 221
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x 
/Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3961
Int[Sqrt[(a_) + (b_.)*tan[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[-2*(b/d) 
  Subst[Int[1/(2*a - x^2), x], x, Sqrt[a + b*Tan[c + d*x]]], x] /; FreeQ[{a 
, b, c, d}, x] && EqQ[a^2 + b^2, 0]
 

rule 4039
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + 
(f_.)*(x_)])^(n_), x_Symbol] :> Simp[b^2*(a + b*Tan[e + f*x])^(m - 2)*((c + 
 d*Tan[e + f*x])^(n + 1)/(d*f*(m + n - 1))), x] + Simp[a/(d*(m + n - 1)) 
Int[(a + b*Tan[e + f*x])^(m - 2)*(c + d*Tan[e + f*x])^n*Simp[b*c*(m - 2) + 
a*d*(m + 2*n) + (a*c*(m - 2) + b*d*(3*m + 2*n - 4))*Tan[e + f*x], x], x], x 
] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 
 0] && NeQ[c^2 + d^2, 0] && IntegerQ[2*m] && GtQ[m, 1] && NeQ[m + n - 1, 0] 
 && (IntegerQ[m] || IntegersQ[2*m, 2*n])
 

rule 4082
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + 
(f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim 
p[b*(B/f)   Subst[Int[(a + b*x)^(m - 1)*(c + d*x)^n, x], x, Tan[e + f*x]], 
x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[ 
a^2 + b^2, 0] && EqQ[A*b + a*B, 0]
 

rule 4083
Int[(((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + 
 (f_.)*(x_)]))/((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[( 
A*b + a*B)/(b*c + a*d)   Int[(a + b*Tan[e + f*x])^m, x], x] - Simp[(B*c - A 
*d)/(b*c + a*d)   Int[(a + b*Tan[e + f*x])^m*((a - b*Tan[e + f*x])/(c + d*T 
an[e + f*x])), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - 
 a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[A*b + a*B, 0]
 
3.2.3.4 Maple [A] (verified)

Time = 1.29 (sec) , antiderivative size = 81, normalized size of antiderivative = 0.78

method result size
derivativedivides \(\frac {2 a^{2} \left (-\sqrt {a +i a \tan \left (d x +c \right )}-\sqrt {a}\, \operatorname {arctanh}\left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}}{\sqrt {a}}\right )+2 \sqrt {a}\, \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right )\right )}{d}\) \(81\)
default \(\frac {2 a^{2} \left (-\sqrt {a +i a \tan \left (d x +c \right )}-\sqrt {a}\, \operatorname {arctanh}\left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}}{\sqrt {a}}\right )+2 \sqrt {a}\, \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right )\right )}{d}\) \(81\)

input
int(cot(d*x+c)*(a+I*a*tan(d*x+c))^(5/2),x,method=_RETURNVERBOSE)
 
output
2/d*a^2*(-(a+I*a*tan(d*x+c))^(1/2)-a^(1/2)*arctanh((a+I*a*tan(d*x+c))^(1/2 
)/a^(1/2))+2*a^(1/2)*2^(1/2)*arctanh(1/2*(a+I*a*tan(d*x+c))^(1/2)*2^(1/2)/ 
a^(1/2)))
 
3.2.3.5 Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 406 vs. \(2 (81) = 162\).

Time = 0.25 (sec) , antiderivative size = 406, normalized size of antiderivative = 3.90 \[ \int \cot (c+d x) (a+i a \tan (c+d x))^{5/2} \, dx=-\frac {4 \, \sqrt {2} a^{2} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} e^{\left (i \, d x + i \, c\right )} - 4 \, \sqrt {2} \sqrt {\frac {a^{5}}{d^{2}}} d \log \left (\frac {4 \, {\left (a^{3} e^{\left (i \, d x + i \, c\right )} + \sqrt {\frac {a^{5}}{d^{2}}} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{a^{2}}\right ) + 4 \, \sqrt {2} \sqrt {\frac {a^{5}}{d^{2}}} d \log \left (\frac {4 \, {\left (a^{3} e^{\left (i \, d x + i \, c\right )} - \sqrt {\frac {a^{5}}{d^{2}}} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{a^{2}}\right ) + \sqrt {\frac {a^{5}}{d^{2}}} d \log \left (\frac {16 \, {\left (3 \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + a^{3} + 2 \, \sqrt {2} \sqrt {\frac {a^{5}}{d^{2}}} {\left (d e^{\left (3 i \, d x + 3 i \, c\right )} + d e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{a}\right ) - \sqrt {\frac {a^{5}}{d^{2}}} d \log \left (\frac {16 \, {\left (3 \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + a^{3} - 2 \, \sqrt {2} \sqrt {\frac {a^{5}}{d^{2}}} {\left (d e^{\left (3 i \, d x + 3 i \, c\right )} + d e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{a}\right )}{2 \, d} \]

input
integrate(cot(d*x+c)*(a+I*a*tan(d*x+c))^(5/2),x, algorithm="fricas")
 
output
-1/2*(4*sqrt(2)*a^2*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*e^(I*d*x + I*c) - 4* 
sqrt(2)*sqrt(a^5/d^2)*d*log(4*(a^3*e^(I*d*x + I*c) + sqrt(a^5/d^2)*(d*e^(2 
*I*d*x + 2*I*c) + d)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1)))*e^(-I*d*x - I*c)/a 
^2) + 4*sqrt(2)*sqrt(a^5/d^2)*d*log(4*(a^3*e^(I*d*x + I*c) - sqrt(a^5/d^2) 
*(d*e^(2*I*d*x + 2*I*c) + d)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1)))*e^(-I*d*x 
- I*c)/a^2) + sqrt(a^5/d^2)*d*log(16*(3*a^3*e^(2*I*d*x + 2*I*c) + a^3 + 2* 
sqrt(2)*sqrt(a^5/d^2)*(d*e^(3*I*d*x + 3*I*c) + d*e^(I*d*x + I*c))*sqrt(a/( 
e^(2*I*d*x + 2*I*c) + 1)))*e^(-2*I*d*x - 2*I*c)/a) - sqrt(a^5/d^2)*d*log(1 
6*(3*a^3*e^(2*I*d*x + 2*I*c) + a^3 - 2*sqrt(2)*sqrt(a^5/d^2)*(d*e^(3*I*d*x 
 + 3*I*c) + d*e^(I*d*x + I*c))*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1)))*e^(-2*I* 
d*x - 2*I*c)/a))/d
 
3.2.3.6 Sympy [F]

\[ \int \cot (c+d x) (a+i a \tan (c+d x))^{5/2} \, dx=\int \left (i a \left (\tan {\left (c + d x \right )} - i\right )\right )^{\frac {5}{2}} \cot {\left (c + d x \right )}\, dx \]

input
integrate(cot(d*x+c)*(a+I*a*tan(d*x+c))**(5/2),x)
 
output
Integral((I*a*(tan(c + d*x) - I))**(5/2)*cot(c + d*x), x)
 
3.2.3.7 Maxima [A] (verification not implemented)

Time = 0.28 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.21 \[ \int \cot (c+d x) (a+i a \tan (c+d x))^{5/2} \, dx=-\frac {2 \, \sqrt {2} a^{\frac {5}{2}} \log \left (-\frac {\sqrt {2} \sqrt {a} - \sqrt {i \, a \tan \left (d x + c\right ) + a}}{\sqrt {2} \sqrt {a} + \sqrt {i \, a \tan \left (d x + c\right ) + a}}\right ) - a^{\frac {5}{2}} \log \left (\frac {\sqrt {i \, a \tan \left (d x + c\right ) + a} - \sqrt {a}}{\sqrt {i \, a \tan \left (d x + c\right ) + a} + \sqrt {a}}\right ) + 2 \, \sqrt {i \, a \tan \left (d x + c\right ) + a} a^{2}}{d} \]

input
integrate(cot(d*x+c)*(a+I*a*tan(d*x+c))^(5/2),x, algorithm="maxima")
 
output
-(2*sqrt(2)*a^(5/2)*log(-(sqrt(2)*sqrt(a) - sqrt(I*a*tan(d*x + c) + a))/(s 
qrt(2)*sqrt(a) + sqrt(I*a*tan(d*x + c) + a))) - a^(5/2)*log((sqrt(I*a*tan( 
d*x + c) + a) - sqrt(a))/(sqrt(I*a*tan(d*x + c) + a) + sqrt(a))) + 2*sqrt( 
I*a*tan(d*x + c) + a)*a^2)/d
 
3.2.3.8 Giac [F]

\[ \int \cot (c+d x) (a+i a \tan (c+d x))^{5/2} \, dx=\int { {\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {5}{2}} \cot \left (d x + c\right ) \,d x } \]

input
integrate(cot(d*x+c)*(a+I*a*tan(d*x+c))^(5/2),x, algorithm="giac")
 
output
integrate((I*a*tan(d*x + c) + a)^(5/2)*cot(d*x + c), x)
 
3.2.3.9 Mupad [B] (verification not implemented)

Time = 0.27 (sec) , antiderivative size = 98, normalized size of antiderivative = 0.94 \[ \int \cot (c+d x) (a+i a \tan (c+d x))^{5/2} \, dx=-\frac {2\,a^2\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{d}-\frac {2\,\mathrm {atanh}\left (\frac {\sqrt {a^5}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{a^3}\right )\,\sqrt {a^5}}{d}+\frac {4\,\sqrt {2}\,\mathrm {atanh}\left (\frac {\sqrt {2}\,\sqrt {a^5}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{2\,a^3}\right )\,\sqrt {a^5}}{d} \]

input
int(cot(c + d*x)*(a + a*tan(c + d*x)*1i)^(5/2),x)
 
output
(4*2^(1/2)*atanh((2^(1/2)*(a^5)^(1/2)*(a + a*tan(c + d*x)*1i)^(1/2))/(2*a^ 
3))*(a^5)^(1/2))/d - (2*atanh(((a^5)^(1/2)*(a + a*tan(c + d*x)*1i)^(1/2))/ 
a^3)*(a^5)^(1/2))/d - (2*a^2*(a + a*tan(c + d*x)*1i)^(1/2))/d